package com.pengtu.spring.boot.dubbo.demo.consumer.web;

import com.alibaba.dubbo.config.annotation.Reference;
import com.pengtu.spring.boot.dubbo.demo.api.HelloService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author w.gang 97419077@qq.com
 * @date 2018/12/14 10:55
 */
@RestController
public class HelloController {

    @Reference
    private HelloService helloService;

    @GetMapping("sayHello")
    public String sayHello(){
        return helloService.sayHello("dubbo");
    }

}
